.class public Lmyclass/ShopData;
.super Landroid/widget/BaseAdapter;
.source "ShopData.java"


# instance fields
.field c:Landroid/content/Context;

.field lf:Landroid/view/LayoutInflater;

.field ls:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lbean/ShopBean;",
            ">;"
        }
    .end annotation
.end field

.field m:Lmyapp/MyApp;

.field private mListView:Landroid/widget/ListView;


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/util/List;Landroid/content/Context;Landroid/widget/ListView;)V
    .locals 0
    .param p1, "context"    # Landroid/content/Context;
    .param p3, "cc"    # Landroid/content/Context;
    .param p4, "dd"    # Landroid/widget/ListView;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Ljava/util/List",
            "<",
            "Lbean/ShopBean;",
            ">;",
            "Landroid/content/Context;",
            "Landroid/widget/ListView;",
            ")V"
        }
    .end annotation

    .prologue
    .line 46
    .local p2, "list":Ljava/util/List;, "Ljava/util/List<Lbean/ShopBean;>;"
    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 47
    check-cast p3, Lmyapp/MyApp;

    .end local p3    # "cc":Landroid/content/Context;
    iput-object p3, p0, Lmyclass/ShopData;->m:Lmyapp/MyApp;

    .line 48
    iput-object p1, p0, Lmyclass/ShopData;->c:Landroid/content/Context;

    .line 49
    iput-object p2, p0, Lmyclass/ShopData;->ls:Ljava/util/List;

    .line 50
    iput-object p4, p0, Lmyclass/ShopData;->mListView:Landroid/widget/ListView;

    .line 51
    return-void
.end method


# virtual methods
.method public getCount()I
    .locals 1

    .prologue
    .line 56
    iget-object v0, p0, Lmyclass/ShopData;->ls:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1
    .param p1, "position"    # I

    .prologue
    .line 62
    const/4 v0, 0x0

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2
    .param p1, "position"    # I

    .prologue
    .line 68
    const-wide/16 v0, 0x0

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 13
    .param p1, "position"    # I
    .param p2, "convertView"    # Landroid/view/View;
    .param p3, "parent"    # Landroid/view/ViewGroup;

    .prologue
    .line 76
    if-nez p2, :cond_0

    .line 77
    iget-object v10, p0, Lmyclass/ShopData;->c:Landroid/content/Context;

    invoke-static {v10}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v10

    const v11, 0x7f030009

    const/4 v12, 0x0

    invoke-virtual {v10, v11, v12}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    .line 79
    :cond_0
    new-instance v3, Lmyclass/ImageLoader;

    iget-object v10, p0, Lmyclass/ShopData;->c:Landroid/content/Context;

    invoke-direct {v3, v10}, Lmyclass/ImageLoader;-><init>(Landroid/content/Context;)V

    .line 80
    .local v3, "imageLoader":Lmyclass/ImageLoader;
    const v10, 0x7f0b0010

    invoke-virtual {p2, v10}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v8

    check-cast v8, Landroid/widget/TextView;

    .line 83
    .local v8, "shopname":Landroid/widget/TextView;
    const v10, 0x7f0b0034

    invoke-virtual {p2, v10}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v6

    .line 82
    check-cast v6, Landroid/widget/TextView;

    .line 87
    .local v6, "opentype":Landroid/widget/TextView;
    const v10, 0x7f0b0036

    invoke-virtual {p2, v10}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v4

    .line 86
    check-cast v4, Landroid/widget/TextView;

    .line 89
    .local v4, "limitcost":Landroid/widget/TextView;
    const v10, 0x7f0b0037

    invoke-virtual {p2, v10}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v7

    .line 88
    check-cast v7, Landroid/widget/TextView;

    .line 91
    .local v7, "sellcount":Landroid/widget/TextView;
    iget-object v10, p0, Lmyclass/ShopData;->ls:Ljava/util/List;

    invoke-interface {v10, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lbean/ShopBean;

    .line 94
    .local v0, "bb":Lbean/ShopBean;
    invoke-virtual {v0}, Lbean/ShopBean;->getShopName()Ljava/lang/String;

    move-result-object v10

    invoke-virtual {v8, v10}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 95
    invoke-virtual {v0}, Lbean/ShopBean;->getOpenType()Ljava/lang/String;

    move-result-object v1

    .line 96
    .local v1, "checkopen":Ljava/lang/String;
    const-string v10, "0"

    invoke-virtual {v1, v10}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v10

    if-eqz v10, :cond_2

    .line 97
    const-string v10, "\u6253\u70ca"

    invoke-virtual {v6, v10}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 103
    :goto_0
    new-instance v10, Ljava/lang/StringBuilder;

    const-string v11, "\u8d77\u9001"

    invoke-direct {v10, v11}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Lbean/ShopBean;->getLimitCost()Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v10

    invoke-virtual {v10}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v10

    invoke-virtual {v4, v10}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 104
    new-instance v10, Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Lbean/ShopBean;->getSellcount()Ljava/lang/String;

    move-result-object v11

    invoke-static {v11}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v11

    invoke-direct {v10, v11}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v11, "\u4eba"

    invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v10

    invoke-virtual {v10}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v10

    invoke-virtual {v7, v10}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 106
    const v10, 0x7f0b0033

    invoke-virtual {p2, v10}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    .line 105
    check-cast v2, Landroid/widget/ImageView;

    .line 108
    .local v2, "im5":Landroid/widget/ImageView;
    invoke-virtual {v0}, Lbean/ShopBean;->getShopImg()Ljava/lang/String;

    move-result-object v9

    .line 109
    .local v9, "strurl":Ljava/lang/String;
    iget-object v10, p0, Lmyclass/ShopData;->m:Lmyapp/MyApp;

    invoke-virtual {v10}, Lmyapp/MyApp;->getloadimg()Z

    move-result v10

    if-nez v10, :cond_1

    .line 110
    sget-object v10, Ljava/lang/System;->out:Ljava/io/PrintStream;

    new-instance v11, Ljava/lang/StringBuilder;

    const-string v12, "\u521d\u5f00\u59cb\u5316\u56fe\u7247 \u52a0\u8f7d    ==>"

    invoke-direct {v11, v12}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v11, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v11

    const-string v12, "\u56fe\u7247:"

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-virtual {v11, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v10, v11}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 111
    invoke-virtual {v3, v9, v2}, Lmyclass/ImageLoader;->DisplayImage(Ljava/lang/String;Landroid/widget/ImageView;)V

    .line 217
    :cond_1
    new-instance v5, Lmyclass/ShopData$1;

    invoke-direct {v5, p0}, Lmyclass/ShopData$1;-><init>(Lmyclass/ShopData;)V

    .line 245
    .local v5, "onScrollListener":Landroid/widget/AbsListView$OnScrollListener;
    return-object p2

    .line 100
    .end local v2    # "im5":Landroid/widget/ImageView;
    .end local v5    # "onScrollListener":Landroid/widget/AbsListView$OnScrollListener;
    .end local v9    # "strurl":Ljava/lang/String;
    :cond_2
    const-string v10, "\u8425\u4e1a"

    invoke-virtual {v6, v10}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_0
.end method

.method public loadImage()V
    .locals 5

    .prologue
    .line 250
    iget-object v2, p0, Lmyclass/ShopData;->mListView:Landroid/widget/ListView;

    invoke-virtual {v2}, Landroid/widget/ListView;->getFirstVisiblePosition()I

    move-result v1

    .line 251
    .local v1, "start":I
    iget-object v2, p0, Lmyclass/ShopData;->mListView:Landroid/widget/ListView;

    invoke-virtual {v2}, Landroid/widget/ListView;->getLastVisiblePosition()I

    move-result v0

    .line 252
    .local v0, "end":I
    invoke-virtual {p0}, Lmyclass/ShopData;->getCount()I

    move-result v2

    if-lt v0, v2, :cond_0

    .line 253
    invoke-virtual {p0}, Lmyclass/ShopData;->getCount()I

    move-result v2

    add-int/lit8 v0, v2, -0x1

    .line 255
    :cond_0
    sget-object v2, Ljava/lang/System;->out:Ljava/io/PrintStream;

    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "---\u4ece "

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "\u5230 "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "---->"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 256
    return-void
.end method
